all: darwin linux tar

clean:
	rm -rf bin.tar bin

tar:
	rm -f bin.tar;
	tar -cf bin.tar bin/;

darwin: darwin32 darwin64

linux: linux32 linux64

darwin32:
	mkdir -p bin/darwin/386/;
	GOOS=darwin GOARCH=386 go build -o bin/darwin/386/mcjson;

darwin64:
	mkdir -p bin/darwin/amd64/;
	GOOS=darwin GOARCH=386 go build -o bin/darwin/amd64/mcjson;

linux32:
	mkdir -p bin/linux/386/;
	GOOS=darwin GOARCH=386 go build -o bin/linux/386/mcjson;

linux64:
	mkdir -p bin/linux/amd64/;
	GOOS=darwin GOARCH=386 go build -o bin/linux/amd64/mcjson;